package 动态规划;

import java.util.Scanner;

/**
 * @Question 积木画
 * @Date 2023/3/7 14:11
 * @Solution
 */
public class 积木画 {
    static double mod=1e9+7;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n=scanner.nextInt();
        long[] dp=new long[10000000];
        dp[0]=0;
        dp[1]=1;
        dp[2]=2;
        dp[3]=5;
        for(int i=4;i<=n;i++) {
            dp[i]=dp[i-1]*2+dp[i-3];
            dp[i]%=mod;
        }
        System.out.print(dp[n]);
    }
}
